﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UserControl/MasterPage.Master"
    AutoEventWireup="true" CodeBehind="ThongTinGioHang.aspx.cs" Inherits="TMDT_Nhom1A.ThongTinGioHang" %>

<%@ Register Src="UserControl/GioHang.ascx" TagName="GioHang" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <uc1:GioHang ID="GioHang1" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="module_round_box_inner">
                <div class="module_round_box_inner2">
                    <div class="s5_mod_h3_1">
                        <div class="s5_mod_h3_2">
                            <h3 class="s5_mod_h3">
                                <span class="s5_h3_first">Chi tiết giỏ hàng</span>
                            </h3>
                        </div>
                    </div>
                    <asp:GridView ID="gvdetailorderproduct" runat="server" Width="100%" AutoGenerateColumns="False"
                        OnRowCommand="gvdetailorderproduct_RowCommand" OnRowDataBound="gvdetailorderproduct_RowDataBound"
                        OnRowCancelingEdit="gvdetailorderproduct_RowCancelingEdit" OnRowEditing="gvdetailorderproduct_RowEditing"
                        OnRowUpdating="gvdetailorderproduct_RowUpdating">
                        <Columns>
                            <asp:TemplateField HeaderText="Tên sản phẩm">
                                <ItemTemplate>
                                    <a href='<%# "San_Pham/ChiTietSanPham.aspx?ElectricDeviceID=" + Eval("ElectricDeviceID") %>'>
                                        <%# Eval("ElectricDeviceID")%></a>
                                    <asp:LinkButton ID="lbElectricName" Visible="false" CommandName="DetailElectric"
                                        CommandArgument='<%# Eval("ElectricDeviceID")%>' Text='<%# Eval("ElectricDeviceID") %>'
                                        PostBackUrl='<%# "San_Pham/ChiTietSanPham.aspx?ElectricDeviceID=" + Eval("ElectricDeviceID")%>'
                                        runat="server" Width="100%"></asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle Width="100px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Giá lẽ">
                                <ItemTemplate>
                                    <del id="delRetailPrice" runat="server" visible="false">
                                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("RetailPrice") %>'></asp:Label></del>
                                    <asp:Label ID="lbRetailPrice" runat="server" Text='<%# Eval("RetailPrice") %>' BorderColor="White"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle Width="100px" HorizontalAlign="Center" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Giá sĩ">
                                <ItemTemplate>
                                    <del id="delDealerPrice" runat="server" visible="false">
                                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("DealerPrice") %>'></asp:Label></del>
                                    <asp:Label ID="lbDealerPrice" runat="server" Text='<%# Eval("DealerPrice") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle Width="100px" HorizontalAlign="Center" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Giá coupon">
                                <ItemTemplate>
                                    <asp:Label ID="lbinfor" runat="server" Visible="false" Text="Không có"></asp:Label>
                                    <asp:Label ID="lbPriceCoupon" Visible="false" runat="server" Text='<%# Eval("PriceCoupon")%>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle Width="100px" HorizontalAlign="Center" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="Quantity" HeaderText="Số lượng">
                                <ItemStyle HorizontalAlign="Center" Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="TotalPrice" HeaderText="Thành tiền" ReadOnly="true">
                                <ItemStyle HorizontalAlign="Center" Width="100px" />
                            </asp:BoundField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <asp:ImageButton ID="btCheckAll" runat="server" ImageUrl="~/images/Check-icon.png"
                                        CommandName="CheckAll" />
                                    <asp:CheckBox ID="cbCheckAll" Visible="false" Checked="false" runat="server" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbcheck" runat="server" />
                                </ItemTemplate>
                                <ItemStyle Width="50px" HorizontalAlign="Center" />
                            </asp:TemplateField>
                            <asp:CommandField CancelText="Hủy" EditText="Sửa" ShowEditButton="True" UpdateText="Cập nhật"
                                ButtonType="Image" CancelImageUrl="~/images/Document-Delete-icon.png" EditImageUrl="~/images/Edit-Document-icon.png"
                                UpdateImageUrl="~/images/3floppy-mount-icon.png">
                                <ItemStyle HorizontalAlign="Center" Width="50px" />
                            </asp:CommandField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <asp:ImageButton ID="btDeleteAll" runat="server" ImageUrl="~/images/Shopping-basket-remove-48.png"
                                        CommandName="btDeleteAll" OnClientClick="if(!confirm('Bạn có muốn xóa các sảm phẩm được chọn không ?')) return false;" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:ImageButton ID="ibdelete" Width="18px" Height="18px" ImageUrl="~/images/delete-icon.png"
                                        CommandArgument='<%# Eval("ElectricDeviceID")%>' CommandName="btDelete" runat="server"
                                        OnClientClick="if(!confirm('Bạn có muốn xóa sản phẩm này không ?')) return false;" />
                                </ItemTemplate>
                                <ItemStyle Width="50px" HorizontalAlign="Center" />
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle CssClass="HeaderGrid" />
                    </asp:GridView>
                    <div style="text-align: center">
                        Tổng số tiền :
                        <asp:Label ID="lbthanhtien" runat="server" Font-Bold="True" ForeColor="Red" Text="Label"></asp:Label>
                        &nbsp;<span style="color: #CC3300">VND</span></div>
                    <div style="clear: both">
                        <center>
                            <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/shopping-cart-down-icon.png"
                                ToolTip="Lưu giỏ hàng lại" OnClick="ImageButton2_Click" />
                            &nbsp;&nbsp;&nbsp;
                            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/shopping-cart-remove-icon.png"
                                ToolTip="Xóa giỏ hàng" OnClick="ImageButton1_Click" />
                            &nbsp;&nbsp;&nbsp;
                            <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/images/Money-icon.png"
                                ToolTip="Thanh toán" OnClick="ImageButton3_Click" />
                            <br />
                            <asp:Label ID="Label1" runat="server" ForeColor="Red" Text="Label" Visible="False"></asp:Label>
                            <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                                <ProgressTemplate>
                                    Đang chờ server xử lý...
                                    <img src="../images/ajax-loader.gif" />&nbsp;&nbsp;
                                </ProgressTemplate>
                            </asp:UpdateProgress>
                        </center>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
